function fixdata(data: ArrayBuffer) { //文件流转BinaryString
	let o = "",
		l = 0,
		w = 10240;
	for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));
	o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));
	return o;
}

export default function (data: ArrayBuffer) {
	return btoa(fixdata(data));
}